package com.lx.pc.mybatis.repository.worder;

import java.math.BigInteger;
import java.util.List;

import org.springframework.data.mybatis.repository.annotation.Query;
import org.springframework.data.mybatis.repository.support.MybatisRepository;
import org.springframework.stereotype.Repository;

import com.lx.pc.domain.entity.worder.WOrderEntity;

@Repository("wOrderRepository")
public interface WOrderRepository extends MybatisRepository<WOrderEntity, BigInteger>{

	/**
	 * 查询总数
	 */
	@Query("findByWOrderCount")
	public int findByWOrderCount(WOrderEntity orderEntity);
	
	/**
	 * 查询分页
	 * @param WOrderEntity
	 * @param page
	 * @param size
	 * @return
	 */
	@Query("findByWOrder")
	public List<WOrderEntity> findByWOrder(WOrderEntity orderEntity,Integer page,Integer size);
	
	/**
	 * 根据订单编号查询
	 * @param orderNum
	 * @return
	 */
	@Query("findByOrderNum")
	public WOrderEntity findByOrderNum(WOrderEntity orderEntity);
	
	/**
	 * 修改
	 * @param orderEntity
	 */
	@Query("updateStatus")
	public Integer updateStatus(WOrderEntity orderEntity);
	
	/**
	 * 查询今日接单总数量
	 * @param orderVo
	 * @return
	 */
	@Query("findByReceiptCount")
	public Integer findByReceiptCount(WOrderEntity orderEntity);
}
